/*
 * Copyright (C) 2015 - present Instructure, Inc.
 *
 * This file is part of Canvas.
 *
 * Canvas is free software: you can redistribute it and/or modify it under
 * the terms of the GNU Affero General Public License as published by the Free
 * Software Foundation, version 3 of the License.
 *
 * Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
 * A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
 * details.
 *
 * You should have received a copy of the GNU Affero General Public License along
 * with this program. If not, see <http://www.gnu.org/licenses/>.
 */

.autocomplete_menu {
  position: absolute;
  z-index: 2000;
  overflow: hidden;
  margin-left: -12px;
  padding: 0 12px 12px;
  display: block;
  > div {
    background: $ic-color-light;
    border: 1px solid $ic-border-light;
    border-radius: $borderRadius;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
    overflow: hidden;
    width: 390px;
    // gets shifted left/right as menu slides
    > div {
      position: relative;
      // each menu level (contains two uls)
      > div {
        float: left;
        width: 390px;
      }
    }
  }
  ul.heading {
    margin: 0;
    overflow: visible;
  }
  ul {
    list-style: none;
    padding: 0;
    margin: 0 0 10px;
    overflow: auto;
    li, li.active.no-results {
      background: $ic-color-light;
      position: relative;
      overflow: hidden;
      border-top: 1px solid $ic-color-light;
      border-bottom: 1px dashed $ic-border-dark;
      padding: 5px;
    }
    li.active.no-results {
      border-bottom: none;
    }
    li.first {
      border-top: none;
    }
    li.last {
      border-bottom: none;
    }
    li.expanded {
      cursor: default;
      background: #fff;
      position: relative;
      z-index: 1;
      box-shadow: 0 0 4px 2px rgba(0, 0, 0, 0.1);
    }
    li.message {
      line-height: 32px;
      text-align: center;
      border-bottom: none;
    }
    li.active, li:focus {
      background: $ic-brand-primary;
      outline: none;
    }
    li.active.expanded {
      background: $ic-color-medium-light;
    }
  }
}
